package com.lepai.component;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.context.Lifecycle;
import org.springframework.context.SmartLifecycle;
import org.springframework.stereotype.Component;

/**
 * @author weihaolong
 * @date 20118-12-05 21:15:00
 * @description
 */
@Component
public class LifecycleInitializationBean implements SmartLifecycle {

    Logger logger = LogManager.getLogger();


    @Override
    public boolean isAutoStartup() {
        return true;
    }

    @Override
    public void stop(Runnable callback) {

    }

    @Override
    public void start() {
        logger.info("lifecycleInitializationBean start");
    }

    @Override
    public void stop() {

    }

    @Override
    public boolean isRunning() {
        return false;
    }

    @Override
    public int getPhase() {
        return 0;
    }
}
